// Initialize Sortable in PageArtifactList.
$(document).ready(function() {
	// Turn list into sortable.
	$("#PageArtifactList").sortable({
		placeholder: 'ui-state-highlight',
		handle: '.handle',
		update: function(event, ui) {
			// Number order fields on update.
			$("input[name^='PageArtifactInlineUpdateForm'][name$='order']" ).each(
				function(i) { this.value=i+1; } );
			}
	});
});